<template>
        <input
         type="text"
        :value="username"
        @input="emit('update:username',(<HTMLInputElement>$event.target).value)"
        >
        <input
         type="text"
        :value="pasword"
        @input="emit('update:pasword',(<HTMLInputElement>$event.target).value)"
        >
</template>
    
<script setup lang='ts'>
// 接收modelValue
defineProps(['username','pasword'])

let emit = defineEmits(['update:username','update:pasword'])
</script>
    
<style scoped>
    input{
        border: 1px solid black;
        background-image:linear-gradient(45deg,red,yellow,green);
        height: 30px;
        font-size: 20px;
        color: #fff;
        border-radius: 5px;
    }
</style>